<%@ page contentType="text/html;charset=UTF-8" language="java"%>

<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html"%>
<%--STRUTS LAYOUT--%>
<%@ taglib uri="/WEB-INF/tld/struts-layout.tld" prefix="layout" %>
<%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic" %>

<%--   --%>



<script language="javascript" type="text/javascript" src="/CSWeb/modules/denuncias/procesos/js/datetimepicker.js"></script>
<script language="javaScript"> 
	var flagVisa = 0;     
	function trim(cadena)
	{
		var indice=0;
		var cadAux="";
		if (cadena!=null)
			while (indice<cadena.length)
			{
				var c=cadena.charAt(indice);
				if (c!=' ') 
				{
					cadAux+=c; 
				}
				indice++;
			}
		return cadAux;
	}
	
	function mostrarCamposDenuncia(condicion){

		alert("entro al java script")
		obj = document.getElementById("camposRobo");
		obj = obj.style;
		obj.display='none';
		
		obj = document.getElementById("camposAcTrans");
		obj = obj.style;
		obj.display='none';
		
		obj = document.getElementById("camposPerDoc");
		obj = obj.style;
		obj.display='none';

		if (condicion == '1'){
		obj = document.getElementById("camposRobo");
		obj = obj.style;
		obj.display='block';
		}
		
		if (condicion == '2'){
		obj = document.getElementById("camposAcTrans");
		obj = obj.style;
		obj.display='block';
		}
		
		if (condicion == '3'){
		obj = document.getElementById("camposPerDoc");
		obj = obj.style;
		obj.display='block';
		}
	}
	
	function validaLongitud(form)
	{
	  
	 // var longitud = document.RegistrarInvestigacionForm.general.XConclusion.length;
	  var longitud = form.general.XConclusion.length;

	  var modulo = parseInt(longitud) % 70;
	  
	  if (modulo > 70){
//	    document.RegistrarInvestigacionForm.general.XConclusion+= "\n" ;
	    form.general.XConclusion+= "\n" ;
	  }
	  
	}

</script>



<layout:html locale="true" styleClass="FORM" >

		<layout:panel styleClass="FORM" >
			<layout:text key="investigacion.numero" property="general.CInvestigacion" readonly="true"></layout:text>
			<layout:panel styleClass="FORM" key="Investigador" >
			  <layout:text key="investigacion.codigo" property="codigo" styleClass="LABEL" readonly="true">
			  	<layout:button onclick="openStrutsLayoutPopup('myPopup');">Buscar</layout:button>
			  </layout:text>
			  <layout:text key="investigacion.nombre" property="general.XInvestigador" styleClass="LABEL" readonly="true"/> 	
			</layout:panel>
			<layout:panel styleClass="FORM" key="DetalleInv" >
				<layout:date key="investigacion.fIniInv" property="general.SFechaInicioInv" mode="E,E,E" patternKey="dateFormat" styleClass="LABEL" />
				<layout:date key="investigacion.fFinInv" property="general.SFechaFinInv" mode="E,E,E" patternKey="dateFormat" styleClass="LABEL" />
				<layout:text key="investigacion.Estado" property="general.CEstadoInv" readonly="true"></layout:text>
				<layout:textarea  key="investigacion.Conclusion" property="general.XConclusion" 
								maxlength="1000" cols="70" rows="15" styleClass="TEXTAREA" onkeyup="validaLongitud(this.form)"></layout:textarea>
			</layout:panel>
 					
		</layout:panel>
</layout:html>